export const insertOptions = (prop, opts, insertTableInfo) => {
    for (const valueKey in insertTableInfo) {
        if (insertTableInfo[valueKey].prop === prop) {
            insertTableInfo[valueKey]["options"] = opts;
            break;
        }
    }
}

export const getLoginAdmin = () => {
    // @ts-ignore
    return JSON.parse(localStorage.getItem("adminlogin"));
}

export const logout = async () => {
    // @ts-ignore
    localStorage.removeItem("adminlogin");
    await window.location.reload();
}